package com.syni.mdd.sjb.common.component.mybatis.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 企业微信用户统计数据实体-数据宝加工
 *
 * @author wangbaitao
 * @Date 2021-03-05
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SjbChatCountDetails implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键Id
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;
    /**
     * 统计日期:yyyy-MM-dd
     */
    private LocalDate statTime;
    /**
     * 新增成员
     */
    private Long newMemeberCnt = 0L;
    /**
     * 新增用户(去重)
     */
    private Long newUserCnt = 0L;
    /**
     * 流失成员
     */
    private Long lostMemberCnt = 0L;
    /**
     * 流失用户(去重)
     */
    private Long lostUserCnt = 0L;
    /**
     * 群聊id
     */
    private String chatId;
    /**
     * 企业id
     */
    private String corpid;
    /**
     * 群主id
     */
    private String owner;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    /**
     * 成员总数
     */
    private Long memberTotal;
    /**
     * 用户总数
     */
    private Long userTotal;
    /**
     * 备注信息
     */
    @TableField(exist = false)
    private String remark;

    public static final String ID = "id";
    public static final String STAT_TIME = "stat_time";
    public static final String NEW_MEMBER_CNT = "new_memeber_cnt";
    public static final String NEW_USER_CNT = "new_user_cnt";
    public static final String LOST_MEMBER_CNT = "lost_member_cnt";
    public static final String LOST_USER_CNT = "lost_user_cnt";
    public static final String CHAT_ID = "chat_id";
    public static final String OWNER = "owner";
    public static final String CREATE_TIME = "create_time";
    public static final String CORP_ID = "corpid";
    public static final String MEMBER_TOTAL = "member_total";
    public static final String USER_TOTAL = "user_total";
}